home *** CD-ROM | disk | FTP | other *** search
/ Tech Arsenal 1 / Tech Arsenal (Arsenal Computer).ISO / tek-01 / lcppb.zip / LCPPANS.ZIP / CIRCUM.CPP < prev    next >
C/C++ Source or Header  |  1991-07-08  |  557b  |  25 lines

  1. // circum.cpp -- Calculate circumference of a circle
  2.  
  3. #include <iostream.h>
  4. #include <stdlib.h>
  5.  
  6. #define PI 3.14159
  7.  
  8. main()
  9. {
  10.   char response[129];     // Holds response to prompt
  11.  
  12.   cout << "Calculate circumference of a circle.";
  13.   cout << "\nDiameter? ";
  14.   cin >> response;
  15.   cout << "Circumference = " << (PI * atof(response));
  16. }
  17.  
  18.  
  19. // Copyright (c) 1990 by Tom Swan. All rights reserved
  20. // Revision 1.00    Date: 10/23/1990   Time: 04:38 pm
  21.  
  22. // Revision 1.01    Date: 07/08/1991   Time: 05:41 pm
  23. // Converted for Borland C++ 2.0
  24.  
  25.